package zoo;

public class ReptileZone extends Zone{
    //鳞片或甲壳
    private String Skin;
    //区域信息
    private ZoneArea Area;
    public  ReptileZone(){}
    public ReptileZone(String skin){
        this.Skin=skin;
    }
    @Override
    public boolean addAnimal(Animal animal){
        //该区域只有爬行动物
        if(AnimalList.size()>0) {
            if (animal.getType() != AnimalList.get(0).getType()) {
                System.out.println("该动物"+animal.getAnimalname()+"不属于爬行园区");
                return false;
            }
        }
        return this.AnimalList.add(animal);
    }

    public ZoneArea getArea() {
        return Area;
    }

    public void setArea(ZoneArea area) {
        this.Area = area;
    }
    public String getSkin() {
        return Skin;
    }

    public void setSkin(String skin) {
        this.Skin = skin;
    }
    @Override
    public void ShowAllAnimal() {
        System.out.println("该区域面积:"+ Area.getArea()+
                " 方位:"+Area.getAzimuth()+
                "\n内有:");
        for( Animal animal : AnimalList ){
            System.out.println("姓名:"+animal.getAnimalname()+
                    " 调温方式:"+animal.getTemperature()+
                    " 繁殖方式:"+animal.getReproductive_methods()+
                    " 外壳:"+Skin);
        }

    }
}
